
CXXFLAGS = -O3 -msse2 -fPIC -Wno-invalid-offsetof -I.

SRC  = ${wildcard *.cpp} 

OBJ=${patsubst %.cpp, %.o, ${SRC}}

LIBNAME = libnanojit.a

all: ${LIBNAME}

clean:
	rm ${OBJ} ${LIBNAME}

%.o: %.cpp
	g++ ${CXXFLAGS} -c $<

${LIBNAME}: ${OBJ}
	ar rcs $@ $^

.PHONY: clean